Skip to content

fix: allow closing a context more than once - #354

Open
Patrick Hintermayer (patrick-immometrica) wants to merge 1 commit into
microsoft:mainfrom
patrick-immometrica:fix/context-close-twice
Open

Patrick Hintermayer (patrick-immometrica) wants to merge 1 commit into
microsoft:mainfrom
patrick-immometrica:fix/context-close-twice

Conversation

@patrick-immometrica

Copy link
Copy Markdown

Calling close() twice on a context is fine in Playwright, but with the plugin the second call fails the test:

ValueError: list.remove(x): x not in list

It comes from the close wrapper in new_context. A second call now skips the bookkeeping and goes straight to the original close(). Test added for sync and async.

@patrick-immometrica
Patrick Hintermayer (patrick-immometrica) marked this pull request as ready for review November 21, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant